The SDMLib Solution to the TTC 2017 Families 2 Persons Case
نویسندگان
چکیده
The TTC 2017 Family to Persons Case asks for bidirectional transformations between a Family model and a Persons model. Each model provides informations that is not contained in the other model. Thus, the case asks to keep some kind of correspondences between the elements of the two models. In addition, the case asks for incremental handling of model changes. Figure 1 shows the SDMLib class model for this case. SDMLib comes with its own code generation, i.e. we do not use the EMF class model nor the EMF code generation. SDMLib class models do not provide aggregation as this is an unusual concept within a graph like object model. Thus, the four associations between Family and FamilyMember are modeled as bidirectional associations with explicit roles at the Family side. To deal with these four associations easily, FamilyMember provides the additional method getFamily() that looks up all four associations in order to find the corresponding family. To maintain the correspondences between the two model parts, we have added a famReg–persReg association between FamilyRegister and PersonRegister. In addition we use a cp–cfm association connecting FamilyMember objects with corresponding Person objects. Adressing the incremental requirement, we use unidirectional changed links between the register objects and their FamilyMember and Person objects, respectively. The set methods mark changed objects with c links, as a side effect. Furthermore, the cp–cfm association has a life-dependency semantics: if one object is explicitly destroyed, the corresponding partner is deleted as well. Again, this is implemented via side effects in the corresponding removeYou() methods.
منابع مشابه
Solving the TTC Families to Persons Case with FunnyQT
This paper describes the FunnyQT solution to the bidirectional Families to Persons transformation case of TTC 2017. The solution is simple and concise and passes all batch transformations and some incremental tests.
متن کاملThe SDMLib Solution to the MovieDB Case for TTC2014
SDMLib [3] is a light-weight model transformation approach based on graph grammar theory. SDMLib provides a Java API that allows to build a class model and to generate an SDMLib specific Java implementation for it. The generated model classes provide bidirectional association implementations, a reflection layer, and XML and JSON serialization mechanisms. In addition, SDMLib generates a set base...
متن کاملAn NMF Solution to the Families to Persons Case at the TTC 2017
This paper presents a solution to the Families to Persons case at the Transformation Tool Contest (TTC) 2017 using the .NET Modeling Framework (NMF). The goal of this case was to bidirectionally synchronize a simple model of family relationships with a simple person register. We propose a solution based on the bidirectional and incremental model transformation language NMF Synchronizations.
متن کاملThe SDMLib Solution to the Java Refactoring Case for TTC2015
This paper describes the SDMLib solution to the Java Refactoring case for TTC2015 [2]. SDMLib provides a mechanism for generating an abstraction model of a provided java program. In addition, SDMLib provides code generation that transforms the whole model or parts of it into java code. Thus, for the Java Refactoring case we just added a Refactorer that reads a java project and transforms the pr...
متن کامل